<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link href="/css/style.css" rel="stylesheet" type="text/css"/>
    <script charset="utf-8" src="/plugin/jquery/jquery-1.7.1.js"></script>
    <title>联想学院</title>
</head>
<body>
<div class="wapper">
    <div id="header">
        <img src="/images/index_banner_bg.gif"/>
    </div>
    <?php require_once("common/nav.php"); ?>
    <div id="subNav">
    </div>
    <div id="main">
        <div id="leftSideBar">
            <?php require_once("common/kuaijie.php"); ?>
        </div>
        <div id="rightContent">
            <div class="articleArea"><h4><img src="/images/index_article_jiantou.gif"><?php echo $articleTypeName ?>
                <span><a href="#"></a></span></h4>

                <ul>
                    <?php foreach ($articles as $key => $value) { ?>
                    <li><span><a
                        href="/index.php/info/index/<?php echo $value->id;  ?>"><?php echo $value->name;  ?></a></span><em>[<?php echo date("Y-m-d", strtotime($value->update_time));?>
                        ]</em></li>
                    <?php }?>

                </ul>
                <DIV
                    style="margin-top:10px; LINE-HEIGHT: 20px; HEIGHT: 20px; TEXT-ALIGN: right">

                    [<B><?php echo $pagination->total_rows ?></B>]条记录
                    [<?php echo $pagination->cur_page ?>]页 [<A
                    href="#">前一页</A>]
                    <?php echo $pagination->create_links() ?>
                    [<A class=""
                        href="#">后一页</A>]
                </DIV>
            </div>

        </div>
    </div>
    <?php require_once("common/footer.php"); ?>
</div>
<script>
    $(function () {
        $("#nav").find("li").each(function () {
            $(this).bind("mouseover", function () {
                $(this).addClass("cur");
                var id = $(this).attr("name");
                $(this).addClass("cur");
                $(this).siblings("li").removeClass("cur");
                if (typeof id == 'undefined') {
                    return false;
                }
                $.ajax({
                    url:"/index.php/ajax/loadSubType/" + id,
                    dataType:"html",
                    async:false,
                    type:"GET",
                    beforeSend:function (jqXHR, settings) {
                        //这里显示进度条
                    },
                    error:function (jqXHR, textStatus, errorThrown) {

                    },
                    success:function (data, textStatus, jqXHR) {
                        data = eval("(" + data + ")");
                        if (data.length > 0) {
                            //如果有子分类
                            var hcodess = "";
                            $.each(data, function (n, j) {
                                hcodess = hcodess + '<a href="/index.php/info/more/' + data[n].id + '/">' + data[n].name + '</a>&nbsp;|&nbsp;';
                            })
                            $("#subNav").html(hcodess.substr(0,hcodess.length-13));
                        } else {
                            $("#subNav").html("");
                        }
                    }});

            })
        })
    })
</script>
</body>
</html>